package com.hx.sp.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by hx-pc on 17-4-25.
 */
@RestController
public class CallHellowController {
    @Autowired
    private FeginHellowClient feginHellowClient;

    @Value("${from}")
    private String from;

    @RequestMapping(value="/hello1", method = RequestMethod.GET)
    public String hello1(String name) {
        System.out.println(from);
        feginHellowClient.hello2(name);
        return feginHellowClient.hello1(name);
    }


    @RequestMapping(value="/hello2", method = RequestMethod.GET)
    public String hello2(String name) {
        feginHellowClient.hello2(name);
        return feginHellowClient.hello1(name);
    }

}
